home *** CD-ROM | disk | FTP | other *** search
/ Family Forum 261 / SOMC Family Forum 261.iso / Xtras / Behavior Library.cst / 00027_Script_Net Show Proxy < prev    next >
Text File  |  1997-11-17  |  2KB  |  55 lines

  1. -- Net Show Proxy 
  2.  
  3.  
  4. -- behavior library version 1.1
  5.  
  6. -- polls the member to see if it's loaded and switches the proxy out when loaded.  Requires 
  7. -- PrepareFrame event so this won't work in a tempo channel wait.  Keep the play head moving
  8. -- or use a go the frame loop. 
  9.  
  10.  
  11. property proxy, heromember, proxyforecolor, proxybackcolor
  12. property saveback, savefore
  13.  
  14. on beginsprite me
  15.   set the saveback of me = the backcolor of sprite the spritenum of me
  16.   set the savefore of me = the forecolor of sprite the spritenum of me
  17.   set the heromember of me = the member of sprite the spritenum of me
  18.   set the member of sprite the spritenum of me = member proxy
  19.   set the forecolor of sprite the spritenum of me = the proxyforecolor of me
  20.   set the backcolor of sprite the spritenum of me = the proxybackcolor of me
  21. end
  22.  
  23.  
  24. on prepareframe me
  25.   if the mediaReady of member the heromember of me then
  26.     set the member of sprite the spritenum of me = member the heromember of me
  27.     set the backcolor of sprite the spritenum of me = the saveback of me
  28.     set the forecolor of sprite the spritenum of me = the savefore of me
  29.   end if
  30. end
  31.  
  32.  
  33. on getPropertyDescriptionList
  34.   if the currentspritenum = 0 then 
  35.     set memdefault = 0 
  36.   else
  37.     set memref = the member of sprite the currentspritenum
  38.     set castlibnum = the castlibnum of memref
  39.     set memdefault = member (the membernum of member memref + 1) of castlib castlibnum
  40.   end if
  41.   
  42.   set p_list = []
  43.   
  44.   set  p_list= [ #proxy: [ #comment:"Proxy Castmember:",#format: #shape, #default:memdefault ], #proxyforecolor: [ #comment:   "Foreground Color Index:",#format:  #integer, #default:    255 ],#proxybackcolor:  [ #comment:   "Background Color Index:", #format: #integer, #default:    0 ]]
  45.   
  46.   
  47.   return p_list
  48. end
  49.  
  50. on getBehaviorDescription 
  51.   return "Displays a designated placeholder image while media is being retrieved from the network.  Allows  a simple graphic (usually a shape) to be displayed while larger cast members load.  Automatically replaces the proxy with actual media when the media finishes downloading. Drag this behavior to a sprite that displays a large cast member that may download slowly." & RETURN & "PARAMETERS:" & RETURN & "ò Proxy Castmember - Enter the name of the internal cast member that should serve as a placeholder."
  52.   
  53.   
  54. end
  55.